//
//  PanNavigationController.m
//  PanPush
//
//  Created by lpc on 16/3/16.
//  Copyright © 2016年 lpc. All rights reserved.
//

#import "PanNavigationController.h"

@interface PanNavigationController ()<SwiperNextViewControllerDelegate>

@property (nonatomic,strong) PanSwiper *swiper;
@property (nonatomic,strong) UIViewController *panToPushNextController;

@end

@implementation PanNavigationController

-(void)viewDidLoad
{
    [super viewDidLoad];
    self.swiper = [[PanSwiper alloc] initWithNavigationController:self];
    self.swiper.delegate = self;
}

- (void)setNextController:(UIViewController *)nextController
{
    NSLog(@"%@",NSStringFromClass([nextController class]));
    self.panToPushNextController = nextController;
}


#pragma mark -- SwiperNextViewController Delegate --
- (UIViewController *)beginPanPushToNextControllerForPanSwiper:(PanSwiper *)swiper
{
    return self.panToPushNextController;
}

- (void)didEndPanPushToNextControllerForPanSwiper:(PanSwiper *)swiper
{
//    self.panToPushNextController = nil;
}

@end
